package com.wzcl.app.dao.model;

import com.wzcl.app.dao.model.common.Base;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;

@Data
@Entity
@Table(name = "fileModel",
        indexes = {
            @Index(columnList = "fileGroupId")
        }
)
@ApiModel(value = "素材模型")
@EntityListeners(AuditingEntityListener.class)
public class FileModel implements Base {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    @ApiModelProperty(value = "素材名称")
    private String name;

    @ApiModelProperty(value = "素材描述")
    private String description;

    @CreatedDate
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "类型")
    private Integer type;

    @ApiModelProperty(value = "封面图")
    private String previewImage;

    @ApiModelProperty(value = "内容")
    private String content;

    @ApiModelProperty(value = "所属组别")
    private Integer fileGroupId;

}
